<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
    <input type="button" @click="changeisshow" value="切换显示"></input>
    <p v-if="isShow">黑马程序员</p>
</div>

<script>
   var app = new Vue({
       el:"#app",
       data:{
          isShow:false
       },
       methods:{
           changeisshow:function () {
           this.isShow =!this.isShow;
           }
       }
   })
</script>
</body>
</html>
